<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('医院信息化建设交流平台')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">

                    <div class="select-list">
                        <ul>
                            <li>
                                <label>内容相关：</label>
                                <input type="text" class="input" placeholder="请输入你想了解的咨询内容" name="liuyan"/>
                                <input type="text" class="hidden"  name="zhuangtai" value="1"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" href="/system/guestbook/guestbookedit">
                    <i class="fa fa-plus"></i> 我要反馈
                </a>
            </div>
            <div class="col-sm-12 select-table "  style="text-align: center;font-weight:700;padding-top: 10px;padding-bottom: 10px;">
                医院信息化建设交流平台
            </div>

            <div class="col-sm-12 select-table table-striped">

                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/guestbook";

        $(function() {
            var options = {
                url: prefix + "/list",
                modalName: "guestbook",
                columns: [

                // {
                //     field: 'wentileixing',
                //     title: '咨询类型'
                // },
                // {
                //     field: 'renyuanleixing',
                //     title: '人员类别'
                // },
                {
                    field: 'shifougongkai',
                    title: '状态'
                },
                {
                    field: 'liuyan',
                    title: '留言'
                },
                {
                    field: 'text2',
                    title: '回复'
                },
                ]
            };
            $.table.init(options);
        });

        function remove(ppId){

            $.ajax({
                type: "post",
                url:  "/system/zwryqk/remove",
                data: {
                    "ids": ppId
                },
                success: function(r) {
                    if (r.code == 0) {
                        if (confirm("删除成功")) {
                            location.href = '/system/tianbao/zaiwailist';
                        }
                    } else {
                        alert(r.msg);
                    }
                }
            });
        }
    </script>
</body>
</html>